/*
 * Copyright (C) ${year} Jeffrey Palm.
 *
 * This code is part of the Floto Project (http://jeffpalm.com/floto/).
 * Please consult the LICENSE included in the distribution.
 */
package com.jeffpalm.floto.isight;

import java.awt.image.BufferedImage;

/**
 * Somethiing that takes pictures.
 */
public interface Capture {
  
  /**
   * Returns a human-readable String containing no spaces describing this.
   * 
   * @return a human-readable String containing no spaces describing this
   */
  String getName();

  /**
   * Takes a snapshot from the screen and returns it.
   * 
   * @return a snapshot of the screen.
   * 
   * @throws Exception
   *           if something goes wrong.
   */
  Snapshot takeSnapshot() throws Exception;

  /**
   * Creates or returns an instance of the enclosing interface.
   */
  interface Factory {
    WebcamCapture newWebcamCapture();

    ScreenShotCapture newScreenShotCapture();
  }

  /**
   * A simple snap shot.
   */
  interface Snapshot {
    BufferedImage getImage();

    int getWidth();

    int getHeight();
  }

}